package com.mfangsoft.zhuangjialong.integration.question.model;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;

/**
 *   问题库
 * table t_biz_question
 *
 * @MLTH_generated do_not_delete_during_merge
 */
@JsonInclude(value=Include.NON_NULL)
public class QuestionEntity implements Serializable {
    /**
     * column id
     *
     * @MLTH_generated
     */
    private Integer id;

    /**
     *   问题类型id
     * column question_type_id
     *
     * @MLTH_generated
     */
    private Integer question_type_id;

    /**
     *   问题标题
     * column title
     *
     * @MLTH_generated
     */
    private String title;

    /**
     *   问题详情
     *   
     * column details
     *
     * @MLTH_generated
     */
    private String details;
    
    private Integer type;
    
    
    public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	private String questionTypeName;
    
    public String getQuestionTypeName() {
    	
    	if(questionType!=null){
    		this.questionTypeName = this.questionType.getQuestion_type();
    	}
    	
		return questionTypeName;
	}

	public void setQuestionTypeName(String questionTypeName) {
		this.questionTypeName = questionTypeName;
	}

	public QuestionTypeEntity getQuestionType() {
		return questionType;
	}

	private QuestionTypeEntity questionType;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table t_biz_question
     *
     * @MLTH_generated
     */
    private static final long serialVersionUID = 1L;

    /**
     * @return the value of INTEGER
     *
     * @MLTH_generated
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id the value for 
     *
     * @MLTH_generated
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     *   问题类型id
     * @return the value of INTEGER
     *
     * @MLTH_generated
     */
    public Integer getQuestion_type_id() {
        return question_type_id;
    }

    /**
     *   问题类型id
     * @param question_type_id the value for 
     *
     * @MLTH_generated
     */
    public void setQuestion_type_id(Integer question_type_id) {
        this.question_type_id = question_type_id;
    }

    /**
     *   问题标题
     * @return the value of VARCHAR
     *
     * @MLTH_generated
     */
    public String getTitle() {
        return title;
    }

    /**
     *   问题标题
     * @param title the value for 
     *
     * @MLTH_generated
     */
    public void setTitle(String title) {
        this.title = title == null ? null : title.trim();
    }

    /**
     *   问题详情
     * @return the value of LONGVARCHAR
     *
     * @MLTH_generated
     */
    public String getDetails() {
        return details;
    }

    /**
     *   问题详情
     * @param details the value for 
     *
     * @MLTH_generated
     */
    public void setDetails(String details) {
        this.details = details == null ? null : details.trim();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", question_type_id=").append(question_type_id);
        sb.append(", title=").append(title);
        sb.append(", details=").append(details);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}